package com.ph.clouds.tracker.emun;

/**
 * @Author yushuangjiang
 * @Time 2021/8/2 15:11
 * @Description： 页面类型枚举
 */
public enum PageEmum {
    //***********启动页***************
    LAUNCH("1000", "启动"),
    PERMISSON("1100", "授权页面"),
    HOME_UNLOGIN("1200", "游客访问页"),
    //***********登录***************
    LOGIN("1500", "登录"),
    //***********首页***************
    HOME("2000", "主页"),

    RESUME_UNLOGIN_HOME("1210", "游客访问页（页面可见）"),
    CLICK_UNLOGIN_APPLY("1220", "立即申请"),
    CLICK_TAB_BILL("1230", "账单"),
    CLICK_TAB_MINE("1240", "我的"),
    CLICK_HOME_CONTRACT("1250", "客服"),
    HOME_APPLY_CLICK("2020", "申请"),

    //***********额度选择***************
    LOAN_CHOICE("3000", "复贷用户申请页"),
    //***********基本资料录入***************
    BASIC_INFO("4000", "基本信息页"),
    CONTACT("6000", "基本信息页"),
    //***********工作资料录入***************
    WORK_INFO("5000", "工作信息页"),
    //***********证件资料录入***************
    IDENTITY_INFO("6000", "证件信息页"),
    LIVE_DETECT("6500", "活体验证"),


    //***********借贷确认页***************
    LOAN_CONFIRM("7000", "确认借款页"),
    //***********推荐***************
    RECOMMEND("13000", "产品推荐页面"),
    //
    APP_EXIT("12000", "客户退出的埋点");

    private String caseValue;
    private String caseName;

    PageEmum(String value, String caseName) {
        this.caseValue = value;
        this.caseName = caseName;
    }


    public String getCaseValue() {
        return caseValue;
    }

    public void setCaseValue(String caseValue) {
        this.caseValue = caseValue;
    }

    public String getCaseName() {
        return caseName;
    }

    public void setCaseName(String caseName) {
        this.caseName = caseName;
    }

    public static PageEmum fromTypeCaseValue(String caseValue) {
        for (PageEmum type : PageEmum.values()) {
            if (type.getCaseValue().equals(caseValue)) {
                return type;
            }
        }
        return null;
    }

}
